package com.qst.crop.service;

import com.github.pagehelper.PageInfo;
import com.qst.crop.entity.Knowledge;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import java.util.List;

/**
 * (Knowledge)表服务接口
 */
public interface KnowledgeService {

	Knowledge queryById(Integer knowledgeId);

	Page<Knowledge> queryByPage(Knowledge knowledge, PageRequest pageRequest);

	Knowledge insert(Knowledge knowledge);

	Knowledge update(Knowledge knowledge);

	boolean deleteById(Integer knowledgeId);

	// 新增：PageHelper 分页与业务方法
	PageInfo<Knowledge> findPage(Integer pageNum);

	void add(Knowledge knowledge);

	void update(Knowledge knowledge, Integer id);

	void delete(Integer id);

	List<Knowledge> selectByUsername(String username);

	Knowledge selectById(Integer id);

	PageInfo<Knowledge> findPageByKeys(String keys, Integer pageNum);
}
